package day_7;/*
 *@ 代阳敲的专属代码
 **/

import java.util.Locale;

public class Test_string {
    public static void main(String[] args) {
        String name = "jack";
        name = "tom";
        final char[] value = {'a','b','c'};
        char[] v2 = {'t','o','m'};
        value[0] = 'H';
        //value =v2;
//       String a="111";
//       String b="111";
//       System.out.println(a==b);
//       String c=new String("22");
//       String d=new String("22");
//       System.out.println(c==d);
////        System.out.println(c.equals(d));
//        String a="111";
//        String b=new String("111");
//        System.out.println(a==b.intern());
//        System.out.println(b==b.intern());
        String a="hello";
        String b="world";
        String c=" heloworld ";
        String d=a+b;
//        System.out.println(c==);
//        System.out.println(c.equals(d));
//        System.out.println(c.indexOf("l"));
//        System.out.println(c.substring(2,5));
//        System.out.println(c);
//        System.out.println(c.trim());
//        System.out.println(c.toLowerCase());
//        System.out.println(c.toUpperCase());
       String s="hello world";
//        StringBuffer sb=new StringBuffer();
//        sb.append(s);
//        System.out.println(sb);
        StringBuffer sb=new StringBuffer("hello world");
        sb.append(',');
        sb.append("java");
        System.out.println(sb);
//        sb.delete(2,5);
//        System.out.println(sb);
        sb.replace(2,5,"java");
        System.out.println(sb);
        sb.insert(2,"111");
        System.out.println(sb);
    }
}
